From 85e0a7e47db518fb5fb2531b2ea7c6d50408875f Mon Sep 17 00:00:00 2001
From: "HATEC\\SPVDEV001" <tri.susilo@altama.co.id>
Date: Fri, 20 Oct 2023 14:02:51 +0700
Subject: logo brand di page brand

---
 src/pages/shop/brands/[slug].jsx | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

(limited to 'src/pages/shop/brands/[slug].jsx')

diff --git a/src/pages/shop/brands/[slug].jsx b/src/pages/shop/brands/[slug].jsx
index d75475b7..c3a7299f 100644
--- a/src/pages/shop/brands/[slug].jsx
+++ b/src/pages/shop/brands/[slug].jsx
@@ -4,6 +4,7 @@ import { useRouter } from 'next/router'
 import _ from 'lodash'
 import Seo from '@/core/components/Seo'
 import Breadcrumb from '@/lib/brand/components/Breadcrumb'
+import useBrand from '@/lib/brand/hooks/useBrand'
 
 const BasicLayout = dynamic(() => import('@/core/components/layouts/BasicLayout'))
 const ProductSearch = dynamic(() => import('@/lib/product/components/ProductSearch'))
@@ -14,6 +15,8 @@ export default function BrandDetail() {
   const { slug = '' } = router.query
 
   const brandName = getNameFromSlug(slug)
+  const id = getIdFromSlug(slug)
+  const {brand} = useBrand({id})
   return (
     <BasicLayout>
       <Seo
@@ -29,12 +32,13 @@ export default function BrandDetail() {
 
       <Breadcrumb brandName={brandName} />
 
-      <Brand id={getIdFromSlug(slug)} />
+      <Brand brand={brand} />
       {!_.isEmpty(router.query) && (
         <ProductSearch
           query={_.omit(router.query, 'slug')}
           prefixUrl={`/shop/brands/${slug}`}
           defaultBrand={getNameFromSlug(slug)}
+          brand={brand}
         />
       )}
     </BasicLayout>
-- 
cgit v1.2.3

